Namespace.Use("Application.Sensor.Adapter", function(ns) {
    var BaseAdapter = Polymorphic.Create(
        [],
        function() {
            //
            //  Members.
            //
            var callbacks = [];

            //
            //  Public methods.
            //
            this.ReceiveData = function() {
                throw "ReceiveData() should be overrided.";
            };
            this.GetDataSets = function() {
                throw "GetDataSetConfigurations() should be overrided";
            };
            this.GetQueryParameter = function() {
                throw "GetQueryParameter() should be overrided.";
            };
            this.AddDataCallback = Polymorphic.Create(
                [Function],
                function(callback) {
                    callbacks.push(callback);
                }
            );
            this.ClearDataCallback = function() {
                callbacks = [];
            };
            this.TriggerDataCallback = Polymorphic.Create(
                [Object],
                function(data) {
                    var out = this;
                    callbacks.forEach(function(callback) {
                        callback.call(this, data);
                    });
                }
            );
        }
    );

    //  Export public APIs / classes.
    Namespace.Export(ns, "BaseAdapter", BaseAdapter);
});
